﻿using K9Tools.Abstractions.Navigation;
using Prism.Ioc;
using Prism.Modularity;

namespace K9Tools.Plugins.WordTools;

public class WordToolsModule: IModule
{
    public void OnInitialized(IContainerProvider containerProvider)
    {
        var navigationManager = containerProvider.Resolve<INavigationManager>();
        navigationManager.Add(
            new NavigationViewItem("Word", "Word", icon: "&#xED68", view: "", sort: 1)
            .AddSubItem(new NavigationViewItem("WordPicCombine",
            "插入图片",
            icon: "&#xED68",
            view: "K9Tools.Plugins.WordTools.Views.Main",
            sort: 1)));
    }

    public void RegisterTypes(IContainerRegistry containerRegistry)
    {
        containerRegistry.RegisterByConvention();

        containerRegistry.RegisterForNavigation<Views.Main>("K9Tools.Plugins.WordTools.Views.Main");
    }
}
